import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    }


}

class Base {
    Base() {
        System.out.print("Base");
    }
}

 class Alpha extends Base {

    public static void main(String[] args) {
        new Alpha();//1
        //调用父类无参的构造方法
        new Base();//2
    }
}
class X{
    Y y=new Y();//1
    public X(){//2
        System.out.print("X");
    }
}
class Y{
    public Y(){//3
        System.out.print("Y");
    }
}
 class Z extends X{
    Y y=new Y();//4
    public Z(){//5
        System.out.print("Z");
    }
    public static void main(String[] args) {
        new Z();
    }
}